package com.bistu.xiong.factory.net;

import com.bistu.xiong.factory.bean.ChatMessage;
import com.bistu.xiong.factory.model.api.RspModel;
import com.bistu.xiong.factory.model.api.account.AccountRspModel;
import com.bistu.xiong.factory.model.api.community.GetUserPostRspModel;

import java.util.ArrayList;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * Created by XiongXiaoJun on 2017/12/15.
 */

public interface RemoteService {

    //用户登录
    @POST("user/login.do")
    Call<RspModel<AccountRspModel>> accountLogin(@QueryMap Map<String,String> user);

    //用户注册
    @POST("user/register.do")
    Call<RspModel<AccountRspModel>> accountRegister(@QueryMap Map<String,String> user);

    //用户更新信息
    @POST("user/update_my_info.do")
    Call<RspModel<AccountRspModel>> accountUpdate(@QueryMap Map<String,String> user);

    //获取当前用户信息
    @POST("user/get_my_info.do")
    Call<RspModel<AccountRspModel>> getMyInfo();

    //用户发帖
    @POST("communityPost/send_post.do")
    Call<RspModel<String>> sendUserPost(@QueryMap Map<String,String> userPost);

    //获取所有帖子的信息
    @POST("communityPost/get_all_post.do")
    Call<RspModel<ArrayList<GetUserPostRspModel>>> getAllUserPost();


    //图灵机器人 接口
    @GET("api")
    Call<ChatMessage> sendToRobotMessage(@Query("key")String key,@Query("info")String info,@Query("userid")String userid);

}
